package com.dayu.demo.pojo;

import javax.persistence.Column;
import java.math.BigDecimal;
import java.math.RoundingMode;
import com.vecspace.database.model.DefaultAggregateEntity;

/** 项目信息 统计数据
 * @template dayu-code-builder
 * @author user
 * @reviewer 
 * @createTime 2021-11-25 17:22:27
 */
public class ProjectStats extends DefaultAggregateEntity implements java.io.Serializable {
    private static final long serialVersionUID = 30013L;

    public ProjectStats(){
    }
/*********************** 分组字段 ****************************/
    /**项目类型*/
    private String projectKind;
    /**所在行政区*/
    private String districtCode;

    /**项目类型*/
    @Column(name = "PROJECT_KIND")
    public String getProjectKind(){
        return this.projectKind;
    }
    /**项目类型*/
    public void setProjectKind(String projectKind){
        this.projectKind = projectKind;
    }
    
    /**所在行政区*/
    @Column(name = "DISTRICT_CODE")
    public String getDistrictCode(){
        return this.districtCode;
    }
    /**所在行政区*/
    public void setDistrictCode(String districtCode){
        this.districtCode = districtCode;
    }
    

/*********************** 聚合字段 ***************************/
    /**项目简称 记录条数*/
    private Integer nameRowsCount;
    /**合同金额 合计*/
    private BigDecimal contractAmountSum;
    /**合同金额 平均值*/
    private BigDecimal contractAmountAvg;
    /**项目评分 合计*/
    private Long projectScoreSum;
    /**项目评分 平均值*/
    private BigDecimal projectScoreAvg;
    /**项目简称 记录条数*/
    @Column(name = "NAME_ROWS_COUNT")
    public Integer getNameRowsCount(){
        return this.nameRowsCount;
    }
    /**项目简称 记录条数*/
    public void setNameRowsCount(Integer nameRowsCount){
        this.nameRowsCount = nameRowsCount;
    }
    
    /**合同金额 合计*/
    @Column(name = "CONTRACT_AMOUNT_SUM")
    public BigDecimal getContractAmountSum(){
        return this.contractAmountSum;
    }
    /**合同金额 合计*/
    public void setContractAmountSum(BigDecimal contractAmountSum){
        if(contractAmountSum != null){
            contractAmountSum = contractAmountSum.setScale(2, RoundingMode.HALF_UP);
        }
        this.contractAmountSum = contractAmountSum;
    }
    
    /**合同金额 平均值*/
    @Column(name = "CONTRACT_AMOUNT_AVG")
    public BigDecimal getContractAmountAvg(){
        return this.contractAmountAvg;
    }
    /**合同金额 平均值*/
    public void setContractAmountAvg(BigDecimal contractAmountAvg){
        if(contractAmountAvg != null){
            contractAmountAvg = contractAmountAvg.setScale(2, RoundingMode.HALF_UP);
        }
        this.contractAmountAvg = contractAmountAvg;
    }
    
    /**项目评分 合计*/
    @Column(name = "PROJECT_SCORE_SUM")
    public Long getProjectScoreSum(){
        return this.projectScoreSum;
    }
    /**项目评分 合计*/
    public void setProjectScoreSum(Long projectScoreSum){
        this.projectScoreSum = projectScoreSum;
    }
    
    /**项目评分 平均值*/
    @Column(name = "PROJECT_SCORE_AVG")
    public BigDecimal getProjectScoreAvg(){
        return this.projectScoreAvg;
    }
    /**项目评分 平均值*/
    public void setProjectScoreAvg(BigDecimal projectScoreAvg){
        if(projectScoreAvg != null){
            projectScoreAvg = projectScoreAvg.setScale(1, RoundingMode.HALF_UP);
        }
        this.projectScoreAvg = projectScoreAvg;
    }
    

    @Override
    public String getKey() {
        // TODO Auto-generated method stub
        return null;
    }
}
